/**
 * Playlist class to hold all the songs collection and manipulate it
 *
 * @copyright  hoatle (hoatle.net)
 * @author     hoatle
 * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version    1.0-alpha
 * @link       http://hoatle.net/Project-Music-Engine
 * @since      Class available since Release 1.0-alpha
 * $Id: Playlist.js 4 2009-01-16 12:03:30Z hoatlevan $
 */
 
/**
 *#include "Song.js"
 */

/**
  * class PlayList
  * Playlist Constructor
  *
  * @params opt_params MAP
  * @return Playlist
  */

Playlist = function(opt_params) {
    this._init();
    return this;
}


/**
 * _init sets all PlayList attributes to their default value. Make sure to call
 * this method within your class constructor
 */
Playlist.prototype._init = function() {
    /**
     * songs is an array holding all the songs in the playlist
     */
    this.songs = [];

    /**Aggregations: */

    /**Compositions: */

}

/**
 * Add new song to the playlist, if existed return false else true
 *
 * @param song
 * @return boolean   
 */
Playlist.prototype.add = function(song) {
    
}


/**
 * Remove the song from playlist, if existed and sucessful removed then return true
 * else false
 *
 * @param song
 * @return boolean
 */
Playlist.prototype.remove = function(song) {
    
}


/**
 * Save the playlist to the user's database or persistence db
 * @return boolean
 */
Playlist.prototype.save = function() {
    
}


/**
 * Get a Song from songIndex, if song existed return Song else return false
 *
 * @param songIndex
 * @return Song
 */
Playlist.prototype.getSong = function(songIndex) {
    
}


/**
 * Check the existed song from the playlist, if yes return true else false
 * @param song
 * @return boolean     
 */
Playlist.prototype.checkExisted = function(song) {
    
}